package base;

import java.util.ArrayList;
import java.util.Scanner;

public class BASIC5 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> list = new ArrayList<>();
		int n = sc.nextInt();
		for (int i = 0; i < n; i++) {
			list.add(sc.nextInt());
		}
		int target = sc.nextInt();
		int index = list.indexOf(target);
		System.out.println(index == -1 ? index : index + 1);
		sc.close();
	}
}
